<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!--<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js" type="application/javascript"></script>-->
    <script src="https://lib.baomitu.com/socket.io/2.3.0/socket.io.js" type="application/javascript"></script>
    <!--IE8只能支持jQuery1.9-->
    <script src="http://cdn.bootcss.com/jquery/1.9.0/jquery.min.js"></script>
    <script>
        $(function(){

            var socket =  io.connect('http://127.0.0.1:8092?token=123456');
            //监听名为helloworld的事件，这与服务端推送的那个事件名称必须一致
            socket.on("123456", function(data){


                $('#x').text(data);
                //$('#y').text(data);

            });
        });

    </script>
</head>
<body>

<div id="display" style="height:50px;">
    x=<span id="x">0</span></span>
</div>

</body>
</html>